// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import PictureElement from '../views/Picture/PictureElement.vue'

import MonitorTable2 from '@/views/Table/MonitorTable2.vue'

const routes = [
  {
    path: '/picture',
    name: 'Picture',
    component: PictureElement,
  },
  {
    path: '/table/:id',
    name: 'Table1',
    component: MonitorTable2,
    props: (route) => ({ tableId: route.params.id }),
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
